<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <script src="vue.js"></script>
  <script src="vuex.js"></script>
</head>
<body>
  <div id="app"></div>
  <script>
    const moduleA = {
      state: { nameA: 'A' },
    }
    const moduleB = {
      state: { nameB: 'B' },
    }
    const store = new Vuex.Store({
      modules: {
        a: moduleA,
        b: moduleB
      }
    })
    var vm = new Vue({
      el: '#app',
      store
    })
    console.log(store.state.a)
    console.log(store.state.b)
  </script>
</body>
</html>